<!doctype html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="viewport"content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <!-- common -->
    <link rel="stylesheet" href="../css/amazeui.min.css">
    <link rel="stylesheet" href="../css/app.css">
    <link rel="stylesheet" href="../css/common.css">
    <script src="../js/jquery.min.js"></script>
    <script src="../js/amazeui.min.js"></script>
    <script src="../plugin/layer/layer.js"></script>
    <script src="../js/common.js"></script>

    <!--分享到微信-->
    <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>


    <!-- page -->
    <link rel="stylesheet" href="../css/index.css">

    <title>太和·投融宝</title>
</head>
<body>
    <div class="imgBox" style="width:100%;">
        <img src="../images/fenxiang.png" alt="" style="width:100%;">
    </div>
<div style="margin:20px 0px;text-align: center;" id="fenxiang">
    <button type="button" class="am-btn am-btn-danger" style="width:90%;" onclick="fenxiang();">分享给好友</button>
</div>

    <p style="font-size: 14px;text-align: center;" id="mx">
        <a href="./shouzhimingxi.html" style="color:#333;text-decoration:underline;">
            查看邀请好友及奖励明细
        </a>
    </p>

    <div style="margin:20px 0px;text-align: center;" id="zhuce">
        <button type="button" class="am-btn am-btn-danger" style="width:95%;" onclick="zhuce();">立即注册</button>
    </div>

</body>
<script type="text/javascript">

    var user = sessionStorage.getItem('TRQuserid');
    /* 判断是否登录 */
    if (user == null ){
        $('#fenxiang').css({display:'none'})
        $('#mx').css({display:'none'})
    }else{
        $('#zhuce').css({display:'none'})
    }


    function getUrlPar(name){
        var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        if(r!=null)return  unescape(r[2]); return null;
    };

    function fenxiang() {
        layer.msg('已生成您的唯一专属ID链接，请点击右上角  [···]  功能菜单按钮，分享并邀请金融圈好友注册，被邀请人注册成为平台会员，将奖励邀请人200元/人，奖励金额无上限。',
            {
            time:7500,
        })
    }
    
    function zhuce() {
        var userId = getUrlPar('userId');
        window.location.href = './registered.html?userId='+userId;
    }


</script>
</html>
